//
//  RequestDataTool.h
//  KaiXinDa
//
//  Created by stonesMonkey on 2018/11/23.
//  Copyright © 2018年 stonesMonkey. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ZYFDataConversionTool.h"
typedef NS_ENUM(NSInteger ,ResetCardType) {
    
    ResetCardSwipeCardType = 1, // 磁条刷卡
    ResetCardSlotCardType = 2, // 卡槽/读卡口读卡
    ResetCardSAMType = 4, // SAM卡座
     ResetCardRFCardType = 5, // 射频卡，也就是扫描二维码/条形码
     ResetCardAutomaticCardType = 7, // 自动检卡
};

typedef NS_ENUM(NSInteger ,ReadFingerprint) {
    
    ReadFingerprintModel, // 读取指纹模板
    ReadFingerprintCharacteristics // 读取指纹特征
};

typedef NS_ENUM(NSInteger ,ReadIDCardMessgae) {
    
    ReadIDCardMessgaeInfomation, // 读取身份证信息
    ReadIDCardMessgaePhoto // 读取头像信息
};

typedef NS_ENUM(NSInteger ,ReadIDCardOperation) {
    
    ReadIDCardOperationHeadPhoto = 1, // 读取头像
    ReadIDCardOperationScanPhoto, // 读取正反面扫描
    ReadIDCardOperationScanAllPhoto// 所有头像
};

typedef NS_ENUM(NSInteger ,FunctionAction) {
    
    NoAction,
    ScanQRCodeActon,
    readFingerPrintFeatureAction,
    readFingerPrintTemplateAction,
    readMagneticCardAction,
    readIDCardInformationAction,
    readIDCardPictureActon,
    readICCardInformationAction,
    waitSwipeCardEventAction,
    exitIDCardAction
};


typedef NS_ENUM(NSInteger ,SendType) {
    
    /// 0 什么都没有的时候
    NotType,
    ///1.1打开磁条卡
    OpenMagneticCardType,
    ///1.2检查刷卡
    CheckCreditCardType,
    ///1.3取消刷卡
    CancelCreditCardType,
    ///2.1自动检卡
    AutoCheckCardType,
    ///2.2开启PBOC流程
    StartPBOCProcessType,
    ///2.3获取55域（IC卡复位只调用自动检卡)
    ObtainDomain55Type,
    ///2.4取消读卡（IC卡复位只调用自动检卡）
    UnreadCardType,
    ///3.1 打开扫描头
    ScanHeadOpenType,
    ///3.2 扫描头扫码
    ScanHeadStarType,
    ///4.1 打开指纹模块
    FingerprintModuleOpenType,
    ///4.2 读取指纹模版
    FingerprintModuleReadType,
    ///4.3 读取指纹特征
    FingerprintReadCharacteristicsType,
    ///4.4 检测手指是否按下
    FingerprintWhetherPressType,
    ///5.1  打开二代证
    IdCardOpenType,
    ///5.2  扫描身份证
    IdCardScanType,
    ///5.3 关闭二代证模块
    IdCardCloseType,
    ///5.4 退卡
    IdCardExitType,
    ///
    GetARQC,
    
};

@interface RequestDataTool : NSObject


///1.1打开磁条卡
+(NSData *)openMagneticCard;

///1.2检查刷卡
+(NSData *)checkCreditCard:(NSInteger)timeOut;

///1.3取消刷卡
+(NSData *)cancelCreditCard;

///2.1自动检卡
+(NSData *)autoCheckCard:(ResetCardType)slot;

///2.2开启PBOC流程
+(NSData *)startPBOCProcess:(ResetCardType)slot;

///2.3获取55域（IC卡复位只调用自动检卡)
+(NSData *)obtainDomain55:(ResetCardType)slot;

///2.4取消读卡（IC卡复位只调用自动检卡）
+(NSData *)unreadCard;

///3.1 打开扫描头
+(NSData *)scanHeadOpen;

///3.2 扫描头扫码
+(NSData *)scanHeadStar;

///4.1 打开指纹模块
+(NSData *)fingerprintModuleOpen;

///4.2 读取指纹模版
+(NSData *)fingerprintModuleRead;

///4.3 读取指纹特征
+(NSData *)fingerprintReadCharacteristics;

///4.4 检测手指是否按下
+(NSData *)fingerprintWhetherPress;

///5.1  打开二代证
+(NSData *)idCardOpen;

///5.2  扫描身份证
+(NSData *)idCardScan:(NSInteger)timeOut type:(ReadIDCardMessgae)type;

///5.3 关闭二代证模块
+(NSData *)idCardClose;

///5.4 退卡
+(NSData *)idCardExit;

+ (NSData *)getARQC;


@end
